import { reactive } from "vue"
import { Loader } from "../../shared/ApiTools"

export type VideoSource = {
    deviceId: string
    devicePlace: string
    flv?: string
    flvHd?: string
    hls?: string
    hlsHd?: string
    lng: number
    lat: number
}

export function useVideoLoader(villageId: string) {
    return reactive(new Loader<VideoSource[]>('/pay/gateway/config/queryUserHlsVideo', 'POST', () => {
        return {  villageId }
    }))
}